"""Shared enum definitions for Real Estate CRM models."""

import enum


class DemandType(str, enum.Enum):
    """客户需求类型."""

    RENT_WHOLE = "rent_whole"  # 租房-整租
    RENT_SHARED = "rent_shared"  # 租房-合租
    RENT_SHORT = "rent_short"  # 租房-短租
    BUY = "buy"  # 买房
    SELL = "sell"  # 卖房


class SourceChannel(str, enum.Enum):
    """客户来源渠道."""

    DOUYIN = "douyin"  # 抖音
    WECHAT = "wechat"  # 微信
    PHONE = "phone"  # 电话
    OFFLINE = "offline"  # 线下
    WALK_IN = "WALK_IN"  # 到店（历史数据兼容）
    REFERRAL = "referral"  # 转介绍
    OTHER = "other"  # 其他


class LeadStage(str, enum.Enum):
    """客户跟进阶段."""

    NEW = "new"  # 新客户
    CONTACTED = "contacted"  # 已联系
    VIEWING = "viewing"  # 看房中
    NEGOTIATING = "negotiating"  # 协商中
    CLOSED_WON = "closed_won"  # 已成交
    CLOSED_LOST = "closed_lost"  # 已流失


class PropertyStatus(str, enum.Enum):
    """Property availability status."""

    VACANT = "vacant"  # 空置
    RENTED = "rented"  # 已租
    RENOVATING = "renovating"  # 装修中
    DELISTED = "delisted"  # 已下架


class PropertyType(str, enum.Enum):
    """Property type classification."""

    APARTMENT = "apartment"  # 公寓
    HOUSE = "house"  # 别墅
    OFFICE = "office"  # 写字楼
    SHOP = "shop"  # 商铺


class IntentionLevel(str, enum.Enum):
    """Customer intention level after viewing."""

    HIGH = "high"  # 高意向
    MEDIUM = "medium"  # 中意向
    LOW = "low"  # 低意向
    NONE = "none"  # 无意向


class QualityGrade(str, enum.Enum):
    """客户质量等级（综合评估）."""

    S = "S"  # S级 (90-100分): 极优客户，顶级优先
    A = "A"  # A级 (80-89分): 优质客户，高优先级
    B = "B"  # B级 (70-79分): 良好客户，中等优先级
    C = "C"  # C级 (60-69分): 普通客户，常规跟进
    D = "D"  # D级 (0-59分): 低质客户，低优先级
